package com.hengpeng.itfin.persist;

import java.util.Date;
import java.util.List;

import com.hengpeng.common.persist.NestedSimplyDao;
import com.hengpeng.itfinbase.persist.ReceivePlan;
import com.hengpeng.itfinbase.persist.ReceivePlan.ReceiveStatus;

public interface ReceivePlanDao extends NestedSimplyDao<ReceivePlan> {
    // public List<ReceivePlan> lockList(Long borrowinfoId, String batchId,
    // Integer curRecNum, ReceiveStatus[] status);

    public List<ReceivePlan> getRepayReceivePlans(Long borrowinfoId, String batchId, Integer curRecNum,
            ReceiveStatus[] status);

    public long countPlans(Long borrowinfoId, String batchId, Integer curRecNum, ReceiveStatus[] status);

    public int updateStatus(Long id, ReceiveStatus newStatus, ReceiveStatus oldStatus, Date receiveTime, Date updateTime);

    /**
     * 批量更新
     * 
     * @param ids
     * @param newStatus
     * @param oldStatus
     * @param receiveTime
     * @param updateTime
     * @return
     */
    public int[] batchUpdateStatus(List<String> ids, ReceiveStatus newStatus, ReceiveStatus oldStatus, Date receiveTime,
            Date updateTime);

    public List<String> getRepayReceivePlanIds(Long borrowinfoId, String batchId, Integer curRecNum,
            ReceiveStatus[] status);
}
